<template>
	<view class="add-btn" @click="handleAdd">
		<text class="add-icon">+</text>
	</view>
</template>

<script setup>
// 定义事件
const emit = defineEmits(['add']);

// 处理添加点击
const handleAdd = () => {
	emit('add');
};
</script>

<style lang="scss" scoped>
.add-btn {
	position: fixed;
	right: 40rpx;
	bottom: calc(100rpx + env(safe-area-inset-bottom)); // 位置调整为底部安全区域+间距
	width: 100rpx;
	height: 100rpx;
	border-radius: 50%;
	background-color: #0066FF;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2rpx 10rpx rgba(0, 102, 255, 0.3);
	z-index: 101;

	.add-icon {
		color: #FFFFFF;
		font-size: 60rpx;
		font-weight: 300;
	}
}
</style> 